import User from "./user";

export enum msgType {
    publish = 'publish',
    private = 'private',
    system = 'system'
}

export class msg {
    public to_id: string;
    public content: any;
    public user: User | null | number;
    public msgType: msgType = msgType.publish;
    
    constructor(to_id: string, content: any, user: User | null, type: msgType) {
        this.to_id = to_id;
        this.content = content;
        this.user = user;
        this.msgType = type;
    }
}
